package ba02;

/**
 * @author 飞哥
 * @version V1.0
 * @package ba01
 * @date 2021/7/23 10:36
 */
public class Student {
    //简单数据类型
    private String name;
    private Integer age;//spring中把String类型看作是简单数据类型

    //引用数据类型
    private School school;

    public Student() {
    }

    public Student(String name, Integer age, School school) {//含参构造方法
        this.name = name;
        this.age = age;
        this.school = school;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Integer getAge() {
        return age;
    }

    public void setAge(Integer age) {
        this.age = age;
    }

    public School getSchool() {
        return school;
    }

    public void setSchool(School school) {
        this.school = school;
    }

    @Override
    public String toString() {
        return "Student{" +
                "name='" + name + '\'' +
                ", age=" + age +
                ", school=" + school +
                '}';
    }
}
